package com.cssw.fyzb.event.proc;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.cssw.fyzb.event.service.live.LiveService;
import com.ydn.its.ItsProc;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 重算排行
 * @author YangYiQun
 */
public class LiveReRankProc implements ItsProc {

    private static final Logger logger = LoggerFactory.getLogger(LiveReRankProc.class);

    @Autowired
    private LiveService liveService;

    @Override
    public void execute(String message) {
        logger.info(message);
        JSONObject jsonObject = JSON.parseObject(message);
        liveService.reRank(jsonObject.getLong("liveId"));
    }

}
